<%@page import="java.util.*,model.common.Repertory,action.common.RepertoryAction,dao.common.RepertoryDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="css/Repertory.css" />
<title>查看库存</title>
</head>
<body>


<img src="img/未标题-1.jpg" width="1080" height="100" />
<div id="Home">
  <ul>
<li><a href="managerHome.jsp">首页</a></li>
   <li><a>用户管理</a>
     <ul>
       <li><a href="employee.jsp">员工信息</a></li>
       <li><a href="jobsituation.jsp">在职情况</a></li>
     </ul>
     
   </li> 
   <li><a>进货管理</a>
     <ul>
       <li><a href="stockplan.jsp">进货计划</a></li>
     </ul>  
   
   </li>
   <li><a>库存管理</a>
     <ul>
       <li><a href="repertory.jsp">库存查询</a></li>
     </ul>
   
   </li>
   <li><a>销售管理</a>
     <ul>
       <li><a href="sellsituation.jsp">销售情况</a></li>
     </ul>   
   
   </li>
   <li><a>系统</a>
     <ul>
       <li><a href="systemMessage.jsp">系统报告</a></li>
     </ul>   
   
   </li>
</div>
   

   <!-- 	<form action="ShowRepertory" method="post">
<input type="submit" value="刷新">
	</form> -->
	
	
<table class="datalist" id="Repertory">  
   <caption><strong><h1>商品库存信息表</h1></strong></caption>
    <tr>  
        <th scope="col"><strong>商品编号</strong></th>  
        <th scope="col"><strong>商品名称</strong></th>  
        <th scope="col"><strong>库存数量</strong></th>  
        <th scope="col"><strong>商品进价</strong></th>  
        <th scope="col"><strong>商品售价</strong></th> 
        <th scope="col"><strong>商品厂商</strong></th>
        <th scope="col"><strong>生产日期</strong></th>  
        <th scope="col"><strong>保质期</strong></th>  
        <th scope="col"><strong>进货日期</strong></th>  
         
        <th scope="col"><strong>进行操作</strong></th>         
    </tr>  
    
    <%
    request.setCharacterEncoding("utf-8");
    response.setContentType("text/html; charset=utf-8");
	List<Repertory> list=new ArrayList<Repertory>(); 
	RepertoryAction act=new RepertoryAction();
		list=act.query(null);
		request.getSession().setAttribute("Repertory",list);
   
	//List list;
	if(session.getAttribute("Repertory")!=null){
		list=(List)session.getAttribute("Repertory");
		if(list.size()>0){
			Repertory r;
			for(int i=0;i<list.size();i++){
				r=new Repertory();
				r=(Repertory)list.get(i);
				%>

		<tr>
			
			<td scope="col"><strong><%=r.getGoodsId()%></strong></td>
			<td scope="col"><strong><%=r.getGoodsName()%></strong></td>
            <td scope="col"><strong><%=r.getGoodsRepertoryNumber() %></strong></td>
			<td scope="col"><strong><%=r.getGoodsUnitPrice()%></strong></td>
			<td scope="col"><strong><%=r.getGoodsPrice()%></strong></td>
			<td scope="col"><strong><%=r.getGoodsManufacturer() %></strong></td>
			<td scope="col"><strong><%=r.getGoodsProductionDate()%></strong></td>
			<td scope="col"><strong><%=r.getGoodsExpirationDate()%></strong></td>
			<td scope="col"><strong><%=r.getGoodsStockDate()%></strong></td>
			<td><a href="DeleteRepertory?id=<%=r.getGoodsId()%>" style="width: 40px; display: block; float: left" />删除</a>
				<a href="editRepertory.jsp?id=<%=r.getGoodsId()%>" style="width: 40px; display: block; float: right" />修改</a></td>
		</tr>
		<%
		        	}
				}
			}
		%>
     
    <tr class="altrow">      
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td>  
        <td>&nbsp;</td> 
        <td>&nbsp;</td>        
    </tr>
      
   
</table>
<a href="addRepertory.jsp?" style="width:35px;display:block;float:left; margin:10px 20px 20px 210px"><h4>增加</h4></a>
    <a href="#" style="width:35px;display:block;float:left;margin:10px 20px 20px -5px"><h4>全选</h4></a>
</body>
</html>